/* TODO: rtl support */

.container {
  --padding-x: 1.5rem;

  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  /* top padding is set to visually align w/ the dashboard action buttons */
  padding: 1.25rem var(--padding-x) 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inputContainer {
  padding: 0 0.75rem 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 3px 6px 0 #0000000d;
  min-height: 3rem;
  border: 1px solid var(--mb-color-border);

  &:focus-within {
    border-color: var(--mb-color-brand);
  }
}

.inputContainerLoading {
  background: var(--mb-color-bg-light);
}

.messagesContainer {
  padding: 1rem var(--padding-x) 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.messages {
  display: flex;
  flex-direction: column;
}

.messageContainer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.messageContainerUser {
  align-items: flex-end;
  align-self: flex-end;
  max-width: 80%;
  min-width: 6rem;
  width: fit-content;
}

.messageContainerUser :global(.smart-link) {
  border: 1px solid var(--mb-color-brand-light);
  position: relative;
  bottom: -2px;
}

.message {
  font-size: 0.875rem;
  line-height: 1.4 !important;
}

.messageUser {
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  background: var(--mb-color-bg-medium);
}

.messageUserAction {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--mb-color-bg-light);
  border: 1px solid var(--mb-color-bg-medium);
  font-weight: bold;
}

.messageActions {
  opacity: 0;
  transition: all 150ms linear;
  min-height: 1rem;
}

.messageContainer:hover .messageActions,
.messageContainer:last-child.messageContainerAgent .messageActions {
  opacity: 1;
}

.promptSuggestionsContainer {
  /* height if there's 3 single-line suggestions
   * this prevents a jump once suggestions have loaded in most cases */
  min-height: 106px;
  flex-shrink: 0;
}

.promptSuggestionButton {
  display: block;
  height: auto;
  text-align: start;
  line-height: 1.4;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;

  span {
    text-wrap-mode: wrap;
  }
}

.textInputContainer {
  padding: 0 1rem 1rem;
}
